﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DBAccess;
using System.Data.Common;

namespace testDAL
{
    public partial class Form1 : Form
    {
        string connStr = "Server=127.0.0.1;Database=testing;Uid=monty;Pwd=aaa;";
        string connStr2 = @"Data Source=PLKRK-L-L3WWXHF\SQL2005;Initial Catalog=smallDeimos;Integrated Security=True";
        public Form1()
        {
            InitializeComponent();
            DAL.GetInstance().InsertData("Insert into test Values( @param0, @param1)", new List<object>() { 9, "adaaada" });
            //DAL.GetInstance().DataSource = DataSources.MSSQL;
            //DAL.GetInstance().ConnectionString = connStr2;
            //DAL.GetInstance().DeleteData("Delete from test Where id = @param0", new List<object>() { 8 });
            //DAL.GetInstance().UpdateData("Update test Set text = @param0 Where id = @param1", new List<object>() { "lalalala", 3 });
            DataSet ds = DAL.GetInstance().GetData("SELECT * FROM players ", new List<object>() { "xxx" });
            dataGridView1.DataSource = ds;
            dataGridView1.DataMember = ds.Tables[0].TableName;
        }
    }
}
